var TableView = Backbone.View.extend ({
	tagName: 'li',
	className: 'table',
	
	initialize: function () {
		var string = this.model.get('TableID');
		this.el.innerText = string;
		this.$el.css({
			position: 'absolute',
			top: this.model.get('x') + '%',
			left: this.model.get('y') + '%',

		});
		console.log(this.model.get('TableID') +' '+ this.model.get('x') + ' ' +this.model.get('y'));
	},
	
	events: {
		'click': 'openTable'
	},
	
	openTable: function() {
		router.navigate('table/'+this.model.get('TableID'), true);
	}
		
});